package com.xszx.controller;

import com.xszx.domain.TUser;
import com.xszx.service.TUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
public class UserController {

    private TUserService userService;

    @Resource
    public void setUserService(TUserService userService) {
        this.userService = userService;
    }


    @RequestMapping("add")
    public void getUser(){
        TUser tUser = new TUser();
        tUser.setName("zhangsan");
        userService.insertUser(tUser);
    }
}
